<!DOCTYPE html>
<html lang="en">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	String basePathCl = request.getScheme()+"://"+request.getServerName()+path+"/";
%>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<script src="<%=basePath%>weixin/js/mui.min.js"></script>
<script src="<%=basePath%>weixin/js/jquery.min.js"></script>
<%--<link rel="stylesheet" href="<%=basePath%>weixin/css/mui.min.css" />--%>

<link rel="stylesheet" href="<%=basePath%>weixin/css/base.css" />
<link rel="stylesheet" href="<%=basePath%>weixin/css/style.css" />

<script src="<%=basePath%>weixin/js/jquery.qrcode.min.js"></script>
<script src="<%=basePath%>weixin/js/page/common.js"></script>
<!-- 微信分享 -->
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script src="<%=basePath%>weixin/js/page/share.js"></script>
<script src="<%=basePath%>weixin/js/jquery.sha1.js"></script>
</head>
<body class="promotion">
<div class="promotionBox">
	<img src="<%=basePath%>weixin/img/bg-3.png" />
	<div class="ewm" id="code">
		<img src="" />
	</div>
</div>
<div class="promotionText">
	<h3>${promotionCode}</h3>
	<h3>长按复制，码上开抢</h3>
</div>
<script>
	(function(mui){
		mui.init();
		$("#code").qrcode({
			render: "canvas",
			text: "<%=basePath%>api/wx/store/league?promotionCode=${promotionCode}"
		});
		var _canvas = $("#code canvas")[0];
		var _img = $("#code img")[0];
		var src = _canvas.toDataURL();
		_img.src = src;
		var wxShare = {
			id : 'wxe5b8956aa9f1485e',
			ticket : '${ticket}',
			title: '开摩邦车联网',
			desc : '推广二维码 - 维修店入驻',
			imgUrl : '<%=basePathCl%>/weixin/img/bg-3.png',
			link : '<%=basePath%>api/wx/store/league?promotionCode=${promotionCode}'
		};
		wxShareInit(wxShare);
	})(mui);
</script>
</body>

</html>
